<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<html>
  <head>
    <title>Library System</title>
    <style>
		body{font-size:16pt;background-color:white;}
		h1{font-size:28pt;font-weight:bold;color:red;}
		input{font-size:16pt;}
    </style>
  </head>
  <body>
  <% if(session.getAttribute("user_id")==null){%>
	<h1>User Login</h1>
	<form method="post" action="http://localhost/Library/LoginServlet" id="form1" name="form1">
		Name: <input type="text" id="text1" name="user_id" value="[Name]"><br>
		Password: <input type="password" id="password1" name="passwd" value=""><br>
		<input type="hidden" id="hidden1" name="hidden1" value=""><br>&nbsp;&nbsp;
		<input type="button" value=" Login " id="button2">
	</form>
	<script>
		document.getElementById("button2").onclick = function(){
			document.form1.hidden1.value = "sbm";
			document.form1.submit();
		};		
	</script>
  </body>
</html>
  <%}else{%>
  	<h1>Hello <%=session.getAttribute("name")%>!</h1>
  </body>
</html>
  <%}%>